
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Gl
	{
		/// <summary>
		/// [GL] Value of GL_ASYNC_MARKER_SGIX symbol.
		/// </summary>
		[RequiredByFeature("GL_SGIX_async")]
		public const int ASYNC_MARKER_SGIX = 0x8329;

		/// <summary>
		/// [GL] glAsyncMarkerSGIX: Binding for glAsyncMarkerSGIX.
		/// </summary>
		/// <param name="marker">
		/// A <see cref="T:uint"/>.
		/// </param>
		[RequiredByFeature("GL_SGIX_async")]
		public static void AsyncMarkerSGIX(uint marker)
		{
			Debug.Assert(Delegates.pglAsyncMarkerSGIX != null, "pglAsyncMarkerSGIX not implemented");
			Delegates.pglAsyncMarkerSGIX(marker);
			LogCommand("glAsyncMarkerSGIX", null, marker			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glFinishAsyncSGIX: Binding for glFinishAsyncSGIX.
		/// </summary>
		/// <param name="markerp">
		/// A <see cref="T:uint[]"/>.
		/// </param>
		[RequiredByFeature("GL_SGIX_async")]
		public static int FinishAsyncSGIX(uint[] markerp)
		{
			Debug.Assert(markerp.Length >= 1);
			int retValue;

			unsafe {
				fixed (uint* p_markerp = markerp)
				{
					Debug.Assert(Delegates.pglFinishAsyncSGIX != null, "pglFinishAsyncSGIX not implemented");
					retValue = Delegates.pglFinishAsyncSGIX(p_markerp);
					LogCommand("glFinishAsyncSGIX", retValue, markerp					);
				}
			}
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [GL] glPollAsyncSGIX: Binding for glPollAsyncSGIX.
		/// </summary>
		/// <param name="markerp">
		/// A <see cref="T:uint[]"/>.
		/// </param>
		[RequiredByFeature("GL_SGIX_async")]
		public static int PollAsyncSGIX(uint[] markerp)
		{
			Debug.Assert(markerp.Length >= 1);
			int retValue;

			unsafe {
				fixed (uint* p_markerp = markerp)
				{
					Debug.Assert(Delegates.pglPollAsyncSGIX != null, "pglPollAsyncSGIX not implemented");
					retValue = Delegates.pglPollAsyncSGIX(p_markerp);
					LogCommand("glPollAsyncSGIX", retValue, markerp					);
				}
			}
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [GL] glGenAsyncMarkersSGIX: Binding for glGenAsyncMarkersSGIX.
		/// </summary>
		/// <param name="range">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GL_SGIX_async")]
		public static uint GenAsyncMarkerSGIX(int range)
		{
			uint retValue;

			Debug.Assert(Delegates.pglGenAsyncMarkersSGIX != null, "pglGenAsyncMarkersSGIX not implemented");
			retValue = Delegates.pglGenAsyncMarkersSGIX(range);
			LogCommand("glGenAsyncMarkersSGIX", retValue, range			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [GL] glDeleteAsyncMarkersSGIX: Binding for glDeleteAsyncMarkersSGIX.
		/// </summary>
		/// <param name="marker">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="range">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GL_SGIX_async")]
		public static void DeleteAsyncMarkerSGIX(uint marker, int range)
		{
			Debug.Assert(Delegates.pglDeleteAsyncMarkersSGIX != null, "pglDeleteAsyncMarkersSGIX not implemented");
			Delegates.pglDeleteAsyncMarkersSGIX(marker, range);
			LogCommand("glDeleteAsyncMarkersSGIX", null, marker, range			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glIsAsyncMarkerSGIX: Binding for glIsAsyncMarkerSGIX.
		/// </summary>
		/// <param name="marker">
		/// A <see cref="T:uint"/>.
		/// </param>
		[RequiredByFeature("GL_SGIX_async")]
		public static bool IsAsyncMarkerSGIX(uint marker)
		{
			bool retValue;

			Debug.Assert(Delegates.pglIsAsyncMarkerSGIX != null, "pglIsAsyncMarkerSGIX not implemented");
			retValue = Delegates.pglIsAsyncMarkerSGIX(marker);
			LogCommand("glIsAsyncMarkerSGIX", retValue, marker			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GL_SGIX_async")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glAsyncMarkerSGIX(uint marker);

			[RequiredByFeature("GL_SGIX_async")]
			[ThreadStatic]
			internal static glAsyncMarkerSGIX pglAsyncMarkerSGIX;

			[RequiredByFeature("GL_SGIX_async")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate int glFinishAsyncSGIX(uint* markerp);

			[RequiredByFeature("GL_SGIX_async")]
			[ThreadStatic]
			internal static glFinishAsyncSGIX pglFinishAsyncSGIX;

			[RequiredByFeature("GL_SGIX_async")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate int glPollAsyncSGIX(uint* markerp);

			[RequiredByFeature("GL_SGIX_async")]
			[ThreadStatic]
			internal static glPollAsyncSGIX pglPollAsyncSGIX;

			[RequiredByFeature("GL_SGIX_async")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate uint glGenAsyncMarkersSGIX(int range);

			[RequiredByFeature("GL_SGIX_async")]
			[ThreadStatic]
			internal static glGenAsyncMarkersSGIX pglGenAsyncMarkersSGIX;

			[RequiredByFeature("GL_SGIX_async")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDeleteAsyncMarkersSGIX(uint marker, int range);

			[RequiredByFeature("GL_SGIX_async")]
			[ThreadStatic]
			internal static glDeleteAsyncMarkersSGIX pglDeleteAsyncMarkersSGIX;

			[RequiredByFeature("GL_SGIX_async")]
			[SuppressUnmanagedCodeSecurity]
			[return: MarshalAs(UnmanagedType.I1)]
			internal delegate bool glIsAsyncMarkerSGIX(uint marker);

			[RequiredByFeature("GL_SGIX_async")]
			[ThreadStatic]
			internal static glIsAsyncMarkerSGIX pglIsAsyncMarkerSGIX;

		}
	}

}
